#!/usr/bin/env python3  /*设定脚本文件直接能执行*/
# -*- coding:utf-8 -*-   /*设置编码*/
"""
@Author: WANDERSON M.PIMENTA
@Software: PyCharm 、Qt Designer and PySide6
@File: tFunctions.py
@Time: 2024/05/11 15:56
@Function：GUI用到的功能函数：如设置svg_icons、设置svg_images、设置images等
"""
import os


# GUI用到的功能函数
class Functions:
    # 获取svg icon的路径
    @staticmethod
    def f_getSvgIconPath(icon_name):
        """
        function:  获取svg icon的路径
              in:  icon_name：UI\\images\\svg_icons 路径下的icon
             out:  icon：拼接后的icon路径
          return:  path
          others:  Get the path of the svg icon
        """
        app_path = os.path.abspath(os.getcwd())
        folder = "UI/images/svg_icons/"
        path = os.path.join(app_path, folder)
        icon = os.path.normpath(os.path.join(path, icon_name))
        return icon

    # 获取image icon的路径
    @staticmethod
    def f_getSvgImagePath(icon_name):
        """
        function:  获取image icon的路径
              in:  icon_name：UI\\images\\svg_images 路径下的icon
             out:  icon：拼接后的icon路径
          return:  path
          others:  Get the path of the image icon
        """
        app_path = os.path.abspath(os.getcwd())
        folder = "UI/images/svg_images/"
        path = os.path.join(app_path, folder)
        icon = os.path.normpath(os.path.join(path, icon_name))
        return icon

    # 获取image的路径
    @staticmethod
    def f_getImagePath(image_name):
        """
        function:  获取image的路径
              in:  icon_name：UI\\images\\images 路径下的icon
             out:  icon：拼接后的icon路径
          return:  path
          others:  Get the path of the image
        """
        app_path = os.path.abspath(os.getcwd())
        folder = "UI/images/images/"
        path = os.path.join(app_path, folder)
        image = os.path.normpath(os.path.join(path, image_name))
        return image
